import request from '@/utils/request'
// 获取企业列表
export const getEnterpriseListAPI = (params) => request.get('/park/enterprise', { params })
//  获取行业列表
export const getIndustryListAPI = () => request.get('/park/industry')
//  上传图片
export const uploadAPI = (data) => request.post('/upload', data)

// 创建公司
export const createExterpriseAPI = (data) => request.post('/park/enterprise', data)
// 获取合同详情
export const getEnterpriseDetailAPI = (id) => request.get(`/park/enterprise/${id}`)
//  编辑确认修改
export const updateExterpriseAPI = (data) => request.put('/park/enterprise', data)
// 删除企业
export const delExterpriseAPI = (id) => request.delete(`/park/enterprise/${id}`)
// 获取楼宇列表
export const getRentBuildListAPI = () => request.get('/park/rent/building')
// 创建合同
export const createRentAPI = (data) => request.post('/park/enterprise/rent', data)
// 获取合同列表
export const getRentListAPI = (id) => request.get(`/park/enterprise/rent/${id}`)
// 退租
// 在 @/api/enterprise.js 中
export const outRentAPI = (rentId) => request.put(`/park/enterprise/rent/${rentId}`)
//
export function getEnterpriseDetail(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'GET'
  })
}
